package a.student.library;

import android.database.Cursor;

	/*
	
		Class name: Course.java
		Function: Day la lop chua thong tin chi tiet cua mot Course. 
			Lop nay don gian chi chua cac Constructor de khoi tao doi tuong dung luu tru du lieu.

	*/

public class Course extends BaseDto{
	public int id;
	public String courseName;
	public String dateStart;
	public String dateEnd;
	public String semesterID;
	
//	cv.put("C_Name", courseInfo.courseName);
//	cv.put("S_ID", courseInfo.semesterID);
//	cv.put("Date_Start", courseInfo.dateStart);
//	cv.put("Date_End", courseInfo.dateEnd);
	
	public static final String COURSE_ID = "C_ID";
	public static final String COURSE_CNAME = "C_Name";
	public static final String COURSE_SID = "S_ID";
	public static final String COURSE_DATESTART = "Date_Start";
	public static final String COURSE_DATESEND = "Date_End";
	
	public static final String COURSE_TBLNAME = "Course";
	public static final String COURSE_DEFAULT_SORT_ORDER = COURSE_ID + " ASC";

	
	public Course(Cursor c){
		super();
		this.id = c.getInt(c.getColumnIndex(COURSE_ID));
		this.courseName = c.getString(c.getColumnIndex(COURSE_CNAME));
		this.dateStart = c.getString(c.getColumnIndex(COURSE_DATESTART));
		this.dateEnd = c.getString(c.getColumnIndex(COURSE_DATESEND));
	}
	
	public Course(int id,String courseName,String dateStart,String dateEnd){
		this.id = id;
		this.courseName = courseName;
		this.dateStart = dateStart;
		this.dateEnd = dateEnd;
	}
	public Course(int id,String courseName,String dateStart,String dateEnd,String semesterID){
		this.id = id;
		this.courseName = courseName;
		this.dateStart = dateStart;
		this.dateEnd = dateEnd;
		this.semesterID = semesterID;
	}

	public int getCourseId() {
		return id;
	}

	public void setCourseId(int id) {
		this.id = id;
	}
	
	
}
